<template>

  <div>



    <a-button type="primary" @click="goBack">
      Go back
    </a-button>

    <div id="map">

    </div>
  </div>


</template>

<script>
export default {
  name: "BaseMap",
  methods: {


    goBack() {
      this.$router.back();
    },


    initMap() {
      //初始化地图
      new AMap.Map('map', {
        resizeEnable: true, //是否监控地图容器尺寸变化
        zoom: 12, //初始地图级别
        center: [121.498586, 31.239637], //初始地图中心点
        showIndoorMap: false //关闭室内地图
      });
    },
  },

  mounted() {
    this.initMap();
  }
}
</script>

<style scoped>
#map {
  width: 800px;
  height: 400px;
  margin: 50px auto;
}
</style>
